<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAccountLogsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('account_logs', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('member_id')->unsigned()->nullable()->index('member_id')->comment('产生的用户');
			$table->boolean('type')->nullable()->comment('1发展关系奖励2下级消费返利3注册奖励4提现5购买套餐或参与活动充值次数6后台充值7购买讲解消费8提现拒绝退款');
			$table->decimal('price', 9)->nullable()->index('price')->comment('增加');
			$table->string('desc')->nullable()->comment('描述');
			$table->timestamps();
			$table->softDeletes();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('account_logs');
	}

}
